function VIE = function_VIE(m, n, e_JXY, e_uv)
%% 各个节点对应局部坐标
kesi = [-1 0 1 -1 0 1 -1 0 1];
ita = [-1 -1 -1 0 0 0 1 1 1];

%% 初始化 VIE
VIE = zeros(1,9);

%% 循环计算单元内各个节点黏度
for i = 1:9
    %% 插值函数求导
    fy_kesi = [1/4*ita(i)*(kesi(i)-1)*(ita(i)-1)+1/4*kesi(i)*ita(i)*(ita(i)-1);
        -ita(i)*kesi(i)*(ita(i)-1);
        1/4*ita(i)*(kesi(i)+1)*(ita(i)-1)+1/4*kesi(i)*ita(i)*(ita(i)-1);
        1/2*(kesi(i)-1)*(1-ita(i)^2)+1/2*kesi(i)*(1-ita(i)^2);
        -2*kesi(i)*(1-ita(i)^2);
        1/2*(kesi(i)+1)*(1-ita(i)^2)+1/2*kesi(i)*(1-ita(i)^2);
        1/4*ita(i)*(kesi(i)-1)*(ita(i)+1)+1/4*kesi(i)*ita(i)*(ita(i)+1);
        -ita(i)*kesi(i)*(ita(i)+1);
        1/4*ita(i)*(kesi(i)+1)*(ita(i)+1)+1/4*kesi(i)*ita(i)*(ita(i)+1)];
    fy_ita = [1/4*kesi(i)*(kesi(i)-1)*(ita(i)-1)+1/4*kesi(i)*ita(i)*(kesi(i)-1);
        1/2*(1-kesi(i)^2)*(ita(i)-1)+1/2*ita(i)*(1-kesi(i)^2);
        1/4*kesi(i)*(kesi(i)+1)*(ita(i)-1)+1/4*kesi(i)*ita(i)*(kesi(i)+1);
        -kesi(i)*ita(i)*(kesi(i)-1);
        -2*(1-kesi(i)^2)*ita(i);
        -kesi(i)*ita(i)*(kesi(i)+1);
        1/4*kesi(i)*(kesi(i)-1)*(ita(i)+1)+1/4*kesi(i)*ita(i)*(kesi(i)-1);
        1/2*(1-kesi(i)^2)*(ita(i)+1)+1/2*ita(i)*(1-kesi(i)^2);
        1/4*kesi(i)*(kesi(i)+1)*(ita(i)+1)+1/4*kesi(i)*ita(i)*(kesi(i)+1)];
    %% Jacobi 相关计算
    dx_dkesi = fy_kesi'*e_JXY(:,1);
    dx_dita = fy_ita'*e_JXY(:,1);
    dy_dkesi = fy_kesi'*e_JXY(:,2);
    dy_dita = fy_ita'*e_JXY(:,2);
    Jacobi = [dx_dkesi dy_dkesi;
        dx_dita dy_dita];
    AAAA = inv(Jacobi)*[fy_kesi'; fy_ita'];
    fy_x = AAAA(1,:)';
    fy_y = AAAA(2,:)';
    det_Jacobi = det(Jacobi);
    %% 单元内节点黏度计算
    vxxvxx = (fy_x'*e_uv(:,1))^2;
    vyyvyy = (fy_y'*e_uv(:,2))^2;
    vxyvyx = (fy_y'*e_uv(:,1) + fy_x'*e_uv(:,2))^2;
    VIE(i) = m*(2*vxxvxx + 2*vyyvyy + vxyvyx)^((n-1)/2);
end

end